﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class K0514
    {
        public K0514()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            InitializeComponent();
            SDSA = "0514";
        }
        public override void LOADALL()
        {
            base.LOADALL();
            if (SDSA.Length == 0) return;
            if (TBMain.Rows.Count > 0)
                return;
            if (DBSDDAT.ContainsKey(SDSA))
            {
                DBSDDAT.Remove(SDSA);
            }
            dwData = TBMain.NewRow();
            TMV.SetUpNewRow(ref dwData, SDSA);
            dwData["KEY"] = "HR";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("时");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("时");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);
            dwData["KEY"] = "MI";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("分");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("分");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "SE";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("秒");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("秒");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);

            dwData["KEY"] = "HM";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("百毫秒");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("百毫秒");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "%";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("%");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("%");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
           
            LOADALL(); 
        }
    }
}
